from core.constant import *
from module.dynamic_module.backtesting.model import BacktestingModel
from module.dynamic_module.factor_analysis.model import FactorAnalysisModel
from module.dynamic_module.fighting.model import FightingModel
from module.dynamic_module.k_chart.model.k_chart_model import KChartModel
from module.dynamic_module.data_bridge.model import DataBridgeModel
from module.dynamic_module.machine_learning.model import MachineLearningModel

from module.dynamic_module.backtesting.view import BacktestingView
from module.dynamic_module.factor_analysis.view import FactorAnalysisView
from module.dynamic_module.fighting.view import FightingView
from module.dynamic_module.k_chart.view.k_chart_view import KChartView
from module.dynamic_module.data_bridge.view import DataBridgeView
from module.dynamic_module.machine_learning.view import MachineLearningView

from module.logic_module.exchange_server.data_server import HistoryData, LiveData
from module.logic_module.exchange_server.trade_server import MessageTrade, SimulateTrade, RealTrade


ModuleModelMap = {
    Module.Backtesting: BacktestingModel,
    Module.FactorAnalysis: FactorAnalysisModel,
    Module.Fighting: FightingModel,
    Module.KChart: KChartModel,
    Module.DataBridge: DataBridgeModel,
    Module.MachineLearning: MachineLearningModel
}

ModuleViewMap = {
    Module.Backtesting: BacktestingView,
    Module.FactorAnalysis: FactorAnalysisView,
    Module.Fighting: FightingView,
    Module.KChart: KChartView,
    Module.DataBridge: DataBridgeView,
    Module.MachineLearning: MachineLearningView
}

FightingModeServerMap = {
    FightingMode.LiveMessage: [LiveData, MessageTrade],
    FightingMode.HistoryMessage: [HistoryData, MessageTrade],
    FightingMode.LiveSimulate: [LiveData, SimulateTrade],
    FightingMode.HistorySimulate: [HistoryData, SimulateTrade],
    FightingMode.LiveReal: [LiveData, RealTrade]
}


